<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../node_modules/vue/dist/vue.js"></script>
</head>

<body>
  <div id="app">

  </div>
  <script>
    // 说明： 只有加上$.mount()这一句，beforeMount才会执行
    new Vue({
      template: '<p id="testa">{{a}}</p>',
      data() {
        return {
          a: 0,
          c: 0
        }
      },
      beforeCreate () {
        console.log('beforeCreate', this)
      },
      created () {
        console.log('created', this)
      },
      beforeMount () {
        console.log('beforeMount', this)
      },
    })
    //.$mount('#app')
  </script>
</body>

</html>